#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    WorkerThread* workThread = new WorkerThread(NULL);
      connect(ui->pushButton, &QPushButton::clicked, [=]()
      {
          workThread->start();
      });

      connect(workThread, &WorkerThread::workFinished, [&]()
      {
          qDebug()<<"workfinished";
      });
}

Widget::~Widget()
{
    delete ui;
}

